# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=trust-store-git
_pkgname=trust-store
pkgver=r423.0292700
pkgrel=3
pkgdesc='C++11 library for persisting trust requests'
url='https://github.com/ubports/trust-store'
arch=(x86_64 i686 armv7h aarch64)
license=(LGPL)
conflicts=(trust-store)
provides=(trust-store)
depends=(qt5-base qt5-quickcontrols boost dbus-cpp gmock lcov gcovr mir apparmor properties-cpp)
makedepends=(git cmake cmake-extras-git doxygen graphviz)
source=('git+https://github.com/ubports/trust-store.git')
sha256sums=('SKIP')

BUILDENV+=('!check') # https://paste.ubuntu.com/p/NZr7FtGtWw/

prepare() {
  cd ${_pkgname}
  git checkout bionic
}

pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

build() {
  cd ${_pkgname}
  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR="lib/" .
  make
}

check() {
  cd ${_pkgname}
  make ARGS+="--output-on-failure" test
}

package() {
  cd ${_pkgname}
  make DESTDIR="${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
